//- Copyright (c) 2016 Lucky Byte, Inc.
tr
  td.center.aligned(rowspan="4"
    style="width:10px; color:darkgreen;") 请求报文
  td.right.aligned.collapsing 消息类型
  td.collapsing.warning(colspan="1")= record.i_pkt[1]
  td.right.aligned.collapsing 交易处理码
  td.collapsing.warning(colspan="1")= record.i_pkt[3]
  td.right.aligned.collapsing 交易名称
  td.collapsing.warning(colspan="1")= record.trinfo.name
  td.right.aligned.collapsing 系统跟踪号
  td.collapsing.warning(colspan="1")= record.i_pkt[11]
  td.right.aligned.collapsing 批次号
  td.collapsing.warning(colspan="1")
    = record.i_pkt[60] ? record.i_pkt[60].substring(2,8) : 0
  td.right.aligned.collapsing MAC
  td.warning(colspan="5")= record.i_pkt[64]

tr
  td.right.aligned.collapsing 主账号
  td.collapsing.warning(colspan="3")
    if record.i_pkt[2]
      if userinfo.view_trinfo
        = record.i_pkt[2]
      else
        i.icon.ban.grey(data-content="无访问权限" data-variation="small")
  td.right.aligned.collapsing 交易金额
  td.collapsing.warning(colspan="1")
    = record.i_pkt[4] ? fmtamt(parseInt(record.i_pkt[4]) / 100) : ''
  td.right.aligned.collapsing 货币代码
  td.warning(colspan="9") #{record.i_pkt[49]} 
    if record.i_pkt[49]
      | － #{constant.curr_codes[record.i_pkt[49]] || '未知'}

tr
  td.right.aligned.collapsing 商户编号
  td.collapsing.warning(colspan="3")= record.i_pkt[42]
  td.right.aligned.collapsing 终端编号
  td.collapsing.warning(colspan="1")= record.i_pkt[41]
  td.right.aligned.collapsing 服务点条件码
  td.collapsing.warning(colspan="1")= record.i_pkt[25]
  td.right.aligned.collapsing 服务点输入方式
  td.collapsing.warning(colspan="1")= record.i_pkt[22]
  td.right.aligned.collapsing F60
  td.warning(colspan="5")= record.i_pkt[60] || ''

tr(style="border-bottom:2px solid rgb(188,88,188);")
  td.right.aligned.collapsing(style="padding-left:4px;") 二磁道信息
  td.collapsing.warning(colspan="5")
    if record.i_pkt[35]
      if userinfo.view_trinfo
        = record.i_pkt[35]
      else
        i.icon.ban.grey(data-content="无访问权限" data-variation="small")
  td.right.aligned.collapsing 三磁道信息
  td.warning(colspan="9")
    if record.i_pkt[36]
      if userinfo.view_trinfo
        = record.i_pkt[36]
      else
        i.icon.ban.grey(data-content="无访问权限" data-variation="small")

tr
  td.center.aligned(rowspan="5"
    style="width:10px; color:darkblue;") 响应报文
  td.right.aligned.collapsing 消息类型
  td.collapsing.positive(colspan="1")= record.o_pkt[1]
  td.right.aligned.collapsing 交易处理码
  td.collapsing.positive(colspan="3")= record.o_pkt[3]
  td.right.aligned.collapsing 系统跟踪号
  td.collapsing.positive(colspan="1")= record.o_pkt[11]
  td.right.aligned.collapsing 批次号
  td.collapsing.positive(colspan="1")
    = record.o_pkt[60] ? record.o_pkt[60].substring(2,8) : 0
  td.right.aligned.collapsing MAC
  td.positive(colspan="5")= record.o_pkt[64]

tr
  td.right.aligned.collapsing 应答码
  td.collapsing.positive(colspan="1")= record.o_pkt[39]
  td.right.aligned.collapsing 授权码
  td.collapsing.positive(colspan="1")= record.o_pkt[38]
  td.right.aligned.collapsing 检索参考号
  td.collapsing.positive(colspan="1")= record.o_pkt[37]
  td.right.aligned.collapsing 清算日期
  td.collapsing.positive(colspan="1")= record.o_pkt[15]
  td.right.aligned.collapsing 受卡方日期/时间
  td.positive(colspan="7") #{record.o_pkt[13]} / #{record.o_pkt[12]}

tr
  td.right.aligned.collapsing 主账号
  td.collapsing.positive(colspan="3")
    if record.o_pkt[2]
      if userinfo.view_trinfo
        = record.o_pkt[2]
      else
        i.icon.ban.grey(data-content="无访问权限" data-variation="small")
  td.right.aligned.collapsing 交易金额
  td.collapsing.positive(colspan="1")
    = record.o_pkt[4] ? fmtamt(parseInt(record.o_pkt[4]) / 100) : ''
  td.right.aligned.collapsing 货币代码
  td.collapsing.positive(colspan="1") #{record.o_pkt[49]} 
    if record.o_pkt[49]
      | － #{constant.curr_codes[record.o_pkt[49]] || '未知'}
  td.right.aligned.collapsing 余 额
  td.positive(colspan="7")
    if record.o_pkt[54]
      if userinfo.view_trinfo
        -
          acct_types = {
            10: '储蓄账户', 20: '支票账户', 30: '信用卡账户', 90: '积分账户'
          }
          acct_type = record.o_pkt[54].substring(0,2)
          amt_type  = record.o_pkt[54].substring(2,4)
          curr_code = record.o_pkt[54].substring(4,7)
          sign      = record.o_pkt[54].substring(7,8)
          amt       = record.o_pkt[54].substring(8)
        | #{acct_types[acct_type] || acct_type} 
        | #{amt_type == '02' ? '可用余额' : amt_type} 
        | #{constant.curr_codes[curr_code] || curr_code} 
        | #{sign == 'C' ? '＋' : '－'} 
        | #{amt ? fmtamt(parseInt(amt) / 100) : ''}
      else
        i.icon.ban.grey(data-content="无访问权限" data-variation="small")

tr
  td.right.aligned.collapsing 商户编号
  td.collapsing.positive(colspan="3")= record.o_pkt[42]
  td.right.aligned.collapsing 终端编号
  td.collapsing.positive(colspan="3")= record.o_pkt[41]
  td.right.aligned.collapsing 服务点条件码
  td.collapsing.positive(colspan="1")= record.o_pkt[25]
  td.right.aligned.collapsing 受理方标识码
  td.collapsing.positive(colspan="1")= record.o_pkt[32]
  td.right.aligned.collapsing 收单机构
  td.positive(colspan="3")= record.o_pkt[44]
